#ifndef SORTFILTERPROXYMODEL_H
#define SORTFILTERPROXYMODEL_H

#include <QSortFilterProxyModel>
#include <QDateTime>

class SortFilterProxyModel : public QSortFilterProxyModel
{
    Q_OBJECT
public:
    explicit SortFilterProxyModel(QObject *parent = 0);
    bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;

    QVariant headerData(int section, Qt::Orientation orientation, int role) const;

signals:

public slots:
    void setFromDateTime(const QDateTime &date) { fromDate = date; invalidateFilter(); }
    void setToDateTime(const QDateTime &date) { toDate = date; invalidateFilter(); }
    void setPatientID(const QString &id) { patientID = id; invalidateFilter(); }
    void setPatientName(const QString &name) { patientName = name; invalidateFilter(); }
    void setReqPhysician(const QString &physician) { reqPhysician = physician; invalidateFilter(); }

private:
    QDateTime fromDate;
    QDateTime toDate;
    QString patientID;
    QString patientName;
    QString reqPhysician;
};

#endif // SORTFILTERPROXYMODEL_H
